<!--
 * @Author: wangwang 2723008256@qq.com
 * @Date: 2022-06-07 10:38:28
 * @LastEditors: wangwang 2723008256@qq.com
 * @LastEditTime: 2022-06-07 10:48:31
 * @FilePath: \jzjypc4.0\src\views\PersonalCenter\MyTeachPlan\gantt.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div ref="gantt" style="heght:500px"></div>
</template>

<script>
import 'dhtmlx-gantt'
export default {
  name: 'gantt',
  props: {
    tasks: {
      type: Object,
      default () {
        return {data: [], links: []}
      }
    }
  },

  mounted: function () {
    gantt.init(this.$refs.gantt)
    gantt.parse(this.$props.tasks)
  }
}
</script>

<style>
    @import "dhtmlx-gantt/codebase/dhtmlxgantt.css";
    .gantt_container{
      height: 800px !important;
    }
</style>